package NovelBar.controller;

import NovelBar.entity.Evaluate;
import NovelBar.mapper.EvaluateMapper;
import NovelBar.service.EvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EvaluateController {
    @Autowired
    EvaluateService evaluateService;

    @RequestMapping("/public/insertEvaluate")
    public int insertEvaluate(Evaluate record){
        return evaluateService.insertEvaluate(record);
    }

    @RequestMapping("/public/selectByBookId")
    public List<Evaluate> selectByBookId(Integer bookId){
        return evaluateService.selectByBookId(bookId);
    }
}
